package com.kis.config

import com.kis.service.order.OrderFallback
import feign.Logger
import feign.Request
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

/**
 * Created by wongloong on 16-12-8.
 */
@Configuration
open class FeignConfiguration {
    val FIVE_SECONDS = 5000

    @Bean
    open fun feignLogger(): Logger.Level {
        return Logger.Level.FULL
    }

    @Bean
    open fun orderfb(): OrderFallback = OrderFallback()

    @Bean
    open fun options(): Request.Options {
        return Request.Options(FIVE_SECONDS, FIVE_SECONDS)
    }
}